#!/bin/bash
workdir=/home/ceph-deploy.d/
yum_base='/etc/yum.repos.d'
ceph_rpm_pkg_dir=$workdir
ceph_rpm_dir='ceph-rpms-0.94.6'
ceph_pkg='ceph-rpms-0.94.6.tar.gz'

#mkdir ${yum_base}/repo.back.d
#cd ${yum_base}
#cat >> ceph.repo <<EOF
#[ceph]
#name=ceph
#baseurl=http://mirrors.aliyun.com/ceph/rpm-hammer/el7/x86_64/
#gpgcheck=0
#[ceph-noarch]
#name=cephnoarch
#baseurl=http://mirrors.aliyun.com/ceph/rpm-hammer/el7/noarch/
#gpgcheck=0
#EOF
#cp *.repo ./repo.back.d/
#wget -O ${yum_base}/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#wget -O ${yum_base}/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
#yum clean all
#yum makecache

cd ${ceph_rpm_pkg_dir}
tar zxf ${ceph_pkg}
cd ${ceph_rpm_dir}

yum install ./deps/*.rpm ./*.rpm -y
